<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>index</title>
    <link rel="stylesheet" href="lib/bootstrap/css/bootstrap.css">
    <script src="lib/jquery/jquery.js" rel="script"></script>
    <script src="lib/respond/respond.min.js" rel="script"></script>
</head>
<body>


<script src="lib/bootstrap/js/bootstrap.js"></script>
<script>
    var indexOf = [].indexOf?function(arr, item) {
    return arr.indexOf(item);
}:function indexOf(arr, item) {
            for (var i = 0; i < arr.length; i++) {
                if (arr[i] === item) {
                    return i;
                }
            }
            return -1;
        };

Array.prototype.unique2 = function() {
    var arr = [];
    for (var i = 0; i < this.length; i++) {
        var item = this[i];
        if (indexOf(arr,item) === -1) {
            arr.push(item);
        }
    }
    return arr;
}
    console.log( [1,2,3,'4',3,4,3,1,'34',2].unique2())   ; //[1, 2, 3, "4", 4, "34"]</script>
</body>
</html>